<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>等船</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
</head>
<body>
<div id="message"></div>
<script>
    var message = ['近日北京暴雨，西边已经开启看海模式','甲：怎么还没到，再不来可就要迟到了啊','乙：不着急，我正在等船']
    var time = 12;
    var i = 0;
    // document.getElementById('message').innerHTML = message[i];
    var timehandler = setInterval(function(){
        time = time-3;
        document.getElementById('message').innerHTML = '<p style="text-align: center;padding:40% 20%;font-size: 20px;color: royalblue;font-weight: bold">'+message[i]+'</p>';
        i++;
        if(time==0){
            clearInterval(timehandler);
            document.getElementById('message').innerHTML = '<image style="width: 100%" src="./dc.jpg" />'
        }
    },2500);

</script>
</body>
</html>